Conversation
- Fixed LED not turning on (it only has LED 1.) - `wii_board_t` members renamed to be more readable. - Added battery and temperature fields. - Weights are adjusted from the current temperature. - The `.x`/`.y` members are now normalized between -1 and +1, and only set if 2 Kg or more is detected. - The `.y` member was negated, so positive means top/front. - `.total_weight` contains the sum of the 4 weights. - `.battery` goes from 0 (critical) to 4 (full charge.)
|
Hi @dkosmari, this is to keep track how far we deviated from upstream wiiuse incase we can remove our wiiuse and use upstream instead. |
|
Here's what I've found:
This is not a problem with wiiuse because it leaves the LED untouched, and you can control the LEDs state yourself. The WPAD functions in libogc don't offer control over the LEDs.
Having the sensors in an array is more useful for the user, since you'll want to process them all. All other expansion structs have nice names, only
Upstream wiiuse does not read battery nor temperature data.
Upstream wiiuse does not correct for temperature since it doesn't read it.
Upstream wiiuse does not have these fields, and I don't think libogc should have them either. It's not very correct when the true zero weight needs to be found by the application/game. On the Wii U's padscore library, there's a function to set the zero, after the player is informed to perform some actions (e.g. step on the board for a few seconds, then off.)
I added this for convenience.
Also brand new in this PR. After this we can maybe introduce a "get battery bars" function to unify the battery reading for all three cases (wiimote, Pro and board) since the bars reading will match official games and System Menu. |
This adds a number of Balance Board changes:
wii_board_tmembers renamed to be more readable, and reordered to match the serialized data..x/.ymembers are now normalized between -1 and +1, and only set if 2 Kg or more is detected..ymember was negated, so positive means top/front..total_weightcontains the sum of the 4 weights..batterygoes from 0 (critical) to 4 (full charge.) The values match the Wii U's padscore library.